﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Castle.Windsor;
using Castle.Windsor.Configuration.Interpreters;
using Castle.MicroKernel.Registration;
using Microsoft.Practices.ServiceLocation;
using CommonServiceLocator.WindsorAdapter;

namespace OAuthClient
{
    /// <summary>
    /// 
    /// </summary>
    static class Program
    {
        /// <summary>
        /// 
        /// </summary>
        static IWindsorContainer _container;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            _container = new WindsorContainer(new XmlInterpreter());
            _container.Register(Component
                .For<IWindsorContainer>()
                .Instance(_container));

            ServiceLocator.SetLocatorProvider(() => new WindsorServiceLocator(_container));

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new OAuthForm());
        }
    }
}
